home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / libx11 / include / x11 / xkw / layout.h < prev    next >
C/C++ Source or Header  |  1999-01-01  |  3KB  |  96 lines

  1. /*
  2.  * $XConsortium: Layout.h,v 1.2 92/01/22 18:03:05 keith Exp $
  3.  *
  4.  * Copyright 1991 Massachusetts Institute of Technology
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of M.I.T. not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  M.I.T. makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  *
  23.  * Author:  Keith Packard, MIT X Consortium
  24.  */
  25.  
  26.  
  27. #ifndef _Layout_h
  28. #define _Layout_h
  29.  
  30. #include <X11/Constraint.h>
  31. #include <X11/Xfuncproto.h>
  32.  
  33. /****************************************************************
  34.  *
  35.  * Layout Widget (SubClass of CompositeClass)
  36.  *
  37.  ****************************************************************/
  38.  
  39. /* RESOURCES:
  40.  
  41.  Name                 Class           RepType        Default Value
  42.  ----                 -----           -------        -------------
  43.  background             Background       Pixel        XtDefaultBackground
  44.  border                 BorderColor       Pixel        XtDefaultForeground
  45.  borderWidth             BorderWidth       Dimension        1
  46.  cursor                 Cursor               Cursor        None
  47.  destroyCallback         Callback       Pointer        NULL
  48.  height                 Height               Dimension        0
  49.  mappedWhenManaged       MappedWhenManaged Boolean        True
  50.  sensitive             Sensitive       Boolean        True
  51.  width                 Width               Dimension        0
  52.  x                 Position       Position        0
  53.  y                 Position       Position            0
  54.  layout             Layout           Layout        NULL
  55.  
  56. */
  57.  
  58. /*
  59.  * Syntax of layout resource
  60.  *
  61.  *  *layout:\
  62.  *    <widget-name>.<edge>,<widget-name>.<edge>: distance + stretch-factor\n\
  63.  *    ...
  64.  *  where the null widget-name is taken to be the Layout widget
  65.  *
  66.  * e.g:
  67.  *
  68.  *  *label-1.hStretch: 0
  69.  *  *label-2.vStretch: 1
  70.  *  *layout:\
  71.  *    .left,        label-1.left:    10 + 0\n\
  72.  *    label-1.right,    label-2.left:    10 + 1\n\
  73.  *    label-2.right,    .right:        10 + 0
  74.  *
  75.  * This layout causes label-1 to be set 10 pixels from the left edge
  76.  * and be whatever size the label widget requests, while label-2 will
  77.  * be set 10 pixels from the right edge, and take up half of the remaining
  78.  * space to 10 pixels from the right edge of label-1.
  79.  */
  80.  
  81. /* New Fields */
  82. #define XtNlayout "layout"
  83. #define XtCLayout "Layout"
  84. #define XtRLayout "Layout"
  85. #define XtNdebug  "debug"
  86.  
  87. /* Class record constant */
  88.  
  89. extern WidgetClass layoutWidgetClass;
  90.  
  91. typedef struct _LayoutClassRec    *LayoutWidgetClass;
  92. typedef struct _LayoutRec    *LayoutWidget;
  93.  
  94. #endif /* _Layout_h */
  95. /* DON'T ADD STUFF AFTER THIS #endif */
  96.